var scripts = [null, null];
$('.page-content-area').ace_ajax('loadScripts', scripts, function() {
	  //inline scripts related to this page
	jQuery(function($) {
	
		var basePath = "/" + app.contextPath;
		var formSettings = {
			// 主键字段
			pkField: "id",
			// 请求地址
			modularPath: {
				editUrl: basePath + "/resources/assets/data/grid-edit.json",
				insertUrl: basePath + "/resources/assets/data/grid-insert.json",
				updateUrl: basePath + "/resources/assets/data/grid-update.json",
			},
			// 表单元素配置
			FormOption: [
				{id:'id',type:"hidden"},
				{id:'id1',title:'序号1',type:"text",required:true,tooltip:""},
				{id:'id2',title:'序号2',type:"text",disabled:true},
				{id:'id3',title:'序号3',type:"text",readonly:true},
				{id:'password',title:'密码',type:"password"},
				{id:'Domain',title:'域名',field:'Domain',type:"text",className:"input-small",value:'',placeholder:"域名",disabled:false,readonly:false,required:false,tooltip:"tooltip1"},
				{id:'date',title:'日期',type:"datetime",format:"YYYY-MM-DD",value:'2018-02-23'},
				{id:'datetime',title:'时间',type:"datetime",format:"YYYY-MM-DD HH:mm:ss",disabled:false,readonly:false,required:true,tooltip:"tooltip2"},
				{id:'time',title:'时刻',type:"datetime",format:"hh:mm:ss"},
				{id:'sex',title:'性别',type:"select",value:'',placeholder:"请选择...",fieldKey:"sex",fieldValue:"sexName",data:[{sex:1,sexName:"男"},{sex:2,sexName:"女"}]},
				{id:'sexId',title:'单选',type:"select",value:'1',data:{"1":"男","2":"女"},disabled:false,readonly:false,required:true,tooltip:"tooltip3"},
				{id:'DomainId',title:'多选',type:"select",value:"",multiple:true,fieldKey:"id",fieldValue:"Domain",data:basePath + "/resources/assets/data/grid.json",dataParam:{},dataSrc:"result"},
				{id:'text',title:'文本',type:"textarea",disabled:false,readonly:false,required:true,tooltip:"tooltip4"},
				{id:'fileUpload',title:'上传',type:"file",multiple:true,fileOption:{maxSize:110000},disabled:false,readonly:false,required:true,tooltip:"tooltip5"},
				{}
			],
		};
		var _myForm = $('#dynamicForm').form(formSettings);

	});
});

